<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0,user-scalable=0">
    <meta content="telephone=no" name="format-detection" />
    <meta name="description" content="">
	<meta name="keywords" content="">
    <title>知识库</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/mobiscroll.css">
    <link rel="stylesheet" type="text/css" href="css/global.css">
    <link rel="stylesheet" type="text/css" href="css/media.css">
    <style type="text/css" media="screen">
        [v-cloak] {
          display: none;
        }    
    </style>
</head>
<body id="app">
    <!-- 头部 -->
    <header class="header">
        <a href="javascript:window.history.go(-1);" title="返回" class="icon back"></a>
        <h1 class="pr" v-cloak data-typeID="{{typeID}}">{{title}}
            <i class="down"></i>
            <select id="names" class="block-select-opt" data-role="none">
                <option value="{{block.id}}" v-for="block in blocks" v-cloak>{{block.name}}</option>
            </select>
        </h1>
        <a href="javascript:void(0);" title="提交" class="text" @click="publish();">提交</a>
    </header>
    
    <section class="padT23 publish" >
        <textarea id="title" class="mar24 pad24"></textarea>
        <textarea id="content" class="mar24 pad24"></textarea>
        <span class="db">
            <i @click="addphoto();"></i>
        </span>
        <ul class="clearfix photo" v-show="addphotoshow" id="dom">
            <li class="imgBox">
                <form  id="am_form" method="post" enctype="multipart/form-data">
                    <img src="images/addphoto.png" @click="selectPic();">
                    <input type="file" class="uploadFile" id="pic" name="pic">
                </form>
            </li>
        </ul>
    </section>
    

    <script type="text/javascript" src="js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="js/lib/vue.js"></script>
    <script type="text/javascript" src="js/lib/common.js"></script>
    <script type="text/javascript" src="js/lib/global.js"></script>
    <script type="text/javascript" src="js/lib/mobiscroll.js"></script>
    <script type="text/javascript" src="js/lib/alert.js"></script>
    <script type="text/javascript" src="js/addConsultation.js"></script>
    <script type="text/javascript" src="js/lib/jquery.form.js"></script>
    <script type="text/javascript" src="js/lib/jHtmlArea-0.8.js"></script>
    <script type="text/javascript">
        function delImg(e){  //删除图片
            $(e).parent().remove();
            var data = {
                pic : $(e).next().attr('src')
            }
          data = Common.jsonEncode(data);
          Common.ajaxCall({ url: 'common_deletePic', datatype: 'json', type: 'get', data: data}, function (data) {
              if(data.error_code==0){
                  alert(data.msg);
              }else{
                  alert(data.msg);
              }
          });
        }
    </script>
</body>
</html>
